/**   
 * @Title: CustCapitalsystem.java 
 * @Package com.betterjr.modules.customer.entity 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author xuzx
 * @date 2017年12月7日 下午5:48:20  
 */
package com.betterjr.modules.customer.entity;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.betterjr.common.annotation.MetaData;
import com.betterjr.common.entity.BetterjrEntity;
import com.betterjr.common.utils.BetterDateUtils;

/** 
 * @ClassName: CustCapitalsystem 
 * @Description: 资金管理系统客户信息
 * @author xuzx
 * @date 2017年12月7日 下午5:48:20 
 *  
 */
@Access(AccessType.FIELD)
@Entity
@Table(name = "t_cloud_platform_custom")
public class CustCloudPlatformCustom implements BetterjrEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "L_CUSTOM_ID", columnDefinition = "INTEGER")
    @MetaData(value = "客户id", comments = "客户id")
    private Long enteID;

    @Column(name = "L_CUSTOM_NO", columnDefinition = "INTEGER")
    @MetaData(value = "客户编码", comments = "客户编码")
    private Long corpCode;

    @Column(name = "C_CUSTOM_NAME", columnDefinition = "VARCHAR")
    @MetaData(value = "客户名称", comments = "客户名称")
    private String corpName;

    @Column(name = "L_TENANT_ID", columnDefinition = "INTEGER")
    @MetaData(value = "集团id", comments = "集团id")
    private Long superId;

    @Column(name = "C_ORG_CODE", columnDefinition = "VARCHAR")
    @MetaData(value = "组织机构代码", comments = "组织机构代码")
    private String occ;

    @Column(name = "C_OPERORG", columnDefinition = "VARCHAR")
    @MetaData(value = "操作机构", comments = "操作机构")
    private String operorg;

    @Column(name = "D_REG_DATE", columnDefinition = "VARCHAR")
    @MetaData(value = "创建日期", comments = "创建日期")
    private String regDate;

    @Column(name = "T_REG_TIME", columnDefinition = "VARCHAR")
    @MetaData(value = "创建时间", comments = "创建时间")
    private String regTime;

    @Column(name = "L_CUSTNO", columnDefinition = "INTEGER")
    @MetaData(value = "关联企e金服客户编号", comments = "关联企e金服客户编号")
    private Long custNo;

    public Long getEnteID() {
        return enteID;
    }

    public void setEnteID(Long anEnteID) {
        enteID = anEnteID;
    }

    public Long getCorpCode() {
        return corpCode;
    }

    public void setCorpCode(Long anCorpCode) {
        corpCode = anCorpCode;
    }

    public String getCorpName() {
        return corpName;
    }

    public void setCorpName(String anCorpName) {
        corpName = anCorpName;
    }

    public Long getSuperId() {
        return superId;
    }

    public void setSuperId(Long anSuperId) {
        superId = anSuperId;
    }

    public String getOcc() {
        return occ;
    }

    public void setOcc(String anOcc) {
        occ = anOcc;
    }

    public String getOperorg() {
        return operorg;
    }

    public void setOperorg(String anOperorg) {
        operorg = anOperorg;
    }

    public String getRegDate() {
        return regDate;
    }

    public void setRegDate(String anRegDate) {
        regDate = anRegDate;
    }

    public String getRegTime() {
        return regTime;
    }

    public void setRegTime(String anRegTime) {
        regTime = anRegTime;
    }

    public Long getCustNo() {
        return custNo;
    }

    public void setCustNo(Long anCustNo) {
        custNo = anCustNo;
    }

    @Override
    public String toString() {
        return "CustCapitalsystemCustom [enteID=" + enteID + ", corpCode=" + corpCode + ", corpName=" + corpName
                + ", superId=" + superId + ", occ=" + occ + ", operorg=" + operorg + ", regDate=" + regDate
                + ", regTime=" + regTime + ", custNo=" + custNo + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (corpCode == null ? 0 : corpCode.hashCode());
        result = prime * result + (corpName == null ? 0 : corpName.hashCode());
        result = prime * result + (custNo == null ? 0 : custNo.hashCode());
        result = prime * result + (enteID == null ? 0 : enteID.hashCode());
        result = prime * result + (occ == null ? 0 : occ.hashCode());
        result = prime * result + (operorg == null ? 0 : operorg.hashCode());
        result = prime * result + (regDate == null ? 0 : regDate.hashCode());
        result = prime * result + (regTime == null ? 0 : regTime.hashCode());
        result = prime * result + (superId == null ? 0 : superId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof CustCloudPlatformCustom)) {
            return false;
        }
        CustCloudPlatformCustom other = (CustCloudPlatformCustom) obj;
        if (corpCode == null) {
            if (other.corpCode != null) {
                return false;
            }
        } else if (!corpCode.equals(other.corpCode)) {
            return false;
        }
        if (corpName == null) {
            if (other.corpName != null) {
                return false;
            }
        } else if (!corpName.equals(other.corpName)) {
            return false;
        }
        if (custNo == null) {
            if (other.custNo != null) {
                return false;
            }
        } else if (!custNo.equals(other.custNo)) {
            return false;
        }
        if (enteID == null) {
            if (other.enteID != null) {
                return false;
            }
        } else if (!enteID.equals(other.enteID)) {
            return false;
        }
        if (occ == null) {
            if (other.occ != null) {
                return false;
            }
        } else if (!occ.equals(other.occ)) {
            return false;
        }
        if (operorg == null) {
            if (other.operorg != null) {
                return false;
            }
        } else if (!operorg.equals(other.operorg)) {
            return false;
        }
        if (regDate == null) {
            if (other.regDate != null) {
                return false;
            }
        } else if (!regDate.equals(other.regDate)) {
            return false;
        }
        if (regTime == null) {
            if (other.regTime != null) {
                return false;
            }
        } else if (!regTime.equals(other.regTime)) {
            return false;
        }
        if (superId == null) {
            if (other.superId != null) {
                return false;
            }
        } else if (!superId.equals(other.superId)) {
            return false;
        }
        return true;
    }

    public void initAddValue(CustCloudPlatformCustom custCloudPlatformCustom) {
        this.regDate = BetterDateUtils.getNumDate();
        this.regTime = BetterDateUtils.getNumTime();

    }
}
